#include "VEnginePCH.h"
#include "VCamera.h"

VCamera::VCamera(void):m_Position(0.0f,0.0f),m_Bound(0,0,0,0)
{
	m_ViewMatrix.SetIdentity();
}

VCamera::~VCamera(void)
{
}

void VCamera::UpdateBound()
{
	float HalfW = m_ViewportSize.x * 0.5f;
	float HalfH = m_ViewportSize.y * 0.5f;
	m_Bound.left	= (int)VFloor(m_Position.x - HalfW);
	m_Bound.right	= (int)VCeil(m_Position.x + HalfW);

	//in scene space  y axis is up. 
	m_Bound.top		= (int)VCeil(m_Position.y + HalfH);
	m_Bound.bottom	= (int)VFloor(m_Position.y - HalfH);
}

